//
//  AIManager.h
//  AI
//
//  Created by 甘世清 on 2023/7/9.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface Manager : NSObject
+(UIViewController*)SQ_getViewController;

+ (UIViewController*)SQ_getCurrentViewController;

/// 根据key存储值
/// @param value 值
/// @param key key
+(void)SQ_SetObject:(NSString*)value FormKey:(NSString*)key;

/// 根据key删除值
/// @param key key
+(void)SQ_removeObjectForKey:(NSString*)key;

/// 根据key取值
/// @param key KEY
+(NSString*)SQ_stringForKey:(NSString*)key;

/// 根据数据判断去对应的根视图
+(void)SQ_goToVC;

/**
 *  获取上一个月的时间
 */
+ (NSString *)getLastMonth:(int)year;

/// 时间
/// @param time 时间戳
+(NSString * )SQ_getTimeString:(NSInteger)time;

+(NSString*)SQ_getStringID;

/**
 对数组里存放model的某个属性对数组进行重新排序

 @param array 待排序数组
 @param increase 是否增序排列
 @param key 属性
 @return <#return value description#>
 */
+(NSArray *)sortArray:(NSArray *)array increase:(BOOL)increase byKey:(NSString *)key;

///  计算文字高度，允许换行计算
/// @param size size description
/// @param lineSpace lineSpace description
/// @param textFont textFont description
/// @param string string description
+ (CGSize)SQ_boundingAttributedStringRectWithSize:(CGSize)size
                                        lineSpace:(CGFloat)lineSpace
                                         textFont:(UIFont *)textFont
                                        string:(NSString *)string;
@end

NS_ASSUME_NONNULL_END
